home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
cat3
/
RegInterp.3
< prev
next >
Wrap
Text File
|
1994-09-20
|
3KB
|
133 lines
Tk_RegisterInterp(3) Tk Library Procedures
_________________________________________________________________
NAME
Tk_RegisterInterp - make an interpreter accessible with
``send'' command
SYNOPSIS
#include <tk.h>
int
Tk_RegisterInterp(_i_n_t_e_r_p, _n_a_m_e, _t_k_w_i_n)
ARGUMENTS
Tcl_Interp *_i_n_t_e_r_p (in) Interpreter to register in
display associated with
_t_k_w_i_n. Also used to return
errors if registration
failed.
char *_n_a_m_e (in) Name under which to register
interpreter. Must be unique
among all registered inter-
preters for _t_k_w_i_n's display.
May not contain the character
``|''.
Tk_Window _t_k_w_i_n (in) Token for window. Used only
to find a display in which to
register _i_n_t_e_r_p.
_________________________________________________________________
DESCRIPTION
Tk_RegisterInterp is invoked to associate a name (_n_a_m_e) with
a Tcl interpreter (_i_n_t_e_r_p) and record that association in a
well-known property of a particular display (the one con-
taining _t_k_w_i_n). After this procedure has been invoked,
other interpreters in the display will be able to use the
send command to invoke operations remotely in _i_n_t_e_r_p. The
procedure returns TCL_OK if the registration completed suc-
cessfully and TCL_ERROR if the interpreter could not be
registered (e.g. because _n_a_m_e is already in use). In the
event of an error, _i_n_t_e_r_p->_r_e_s_u_l_t is modified to point to a
message describing the error.
This procedure also adds a send command to _i_n_t_e_r_p, so that
commands may be sent from _i_n_t_e_r_p to other interpreters.
The registration persists until the interpreter is deleted
or the send command is deleted from _i_n_t_e_r_p, at which point
_i_n_t_e_r_p is automatically unregistered.
Tk 1
Tk_RegisterInterp(3) Tk Library Procedures
Tk_RegisterInterp is called automatically by
Tk_CreateMainWindow, so applications don't normally need to
call it explicitly.
KEYWORDS
interpreter, name, register, send command
Tk 2